﻿using System.Text.Json;
using System.Text.Json.Serialization;
namespace WeatherApp.Dtos;
public class WeatherResponse
{    public Result[] Results { get; set; }
}

public class Result
{
    public Location Location { get; set; } = new Location();
    public Now Now { get; set; } = new();

    [JsonPropertyName("last_update")]
    public DateTime LastUpdate { get; set; }
}

public class Location
{
    public string Id { get; set; } = string.Empty;
    public string Name { get; set; } = string.Empty;
    public string Country { get; set; } = string.Empty;
    public string Path { get; set; } = string.Empty;
    public string Timezone { get; set; } = string.Empty;

    [JsonPropertyName("timezone_offset")]
    public string TimezoneOffset { get; set; } = string.Empty;
}

public class Now
{
    public string Text { get; set; } = string.Empty;
    public string Code { get; set; } = string.Empty;
    public string Temperature { get; set; } = string.Empty;
}
